<template>
	<view>
	<view  v-for="(item,index) in fail" :key="index" >
		<view class="huolie1" @tap="gotodetails()" >
		  <view class="box">
			<image :src="'../../static/'+item.defaultUrl" class="huotu"></image>
			<view class="huohang">{{item.content}}</view>
			<view class="huozxia">{{item.startTime}}</view>
		  </view>
		</view>
	</view>
</view>	
</template>

<script>
	export  default{
		data(){
			return{
				selectAllActivity:'',
				fail:'',
				defaultUrl:''
			}
		},
		methods:{
			gotodetails(){
				uni.navigateTo({
					url:'../../components/activdetails/activdetails'
				})
			}
		},
		mounted(){
		    uni.request({
		    	url: 'https://www.zunyishengshui.com/maishui/Activity/selectAllActivity', //仅为示例，并非真实接口地址。
		    	method:'POST',
		    	data: {
					selectAllActivity:'',
		    	},
		    	header:{
		    		'content-type': 'application/x-www-form-urlencoded', 
		    	},
		    	success: (res) => {
		    		this.fail = res.data.data;
					for(var i = 0;i< this.fail.length;i++){
						this.fail[i].defaultUrl = this.fail[i].defaultUrl.substr(15)
					}
		    		console.log(this.fail);
		    		this.text = 'request success';
		    		
		    	}
		    })
		},
		
		
		
		
		
		
		
		
		
		
		
		
		
	}
</script>

<style>
	.huolie1{
		width: 100%;
		display: flex;
		height: 260upx;
	}
	.box{
		width: 100%;
		height: 260upx;
		position: relative;
		border-bottom: 1px solid #D7D7D7;
	}
	.huotu{
		width: 208upx;
		height: 209upx;
		position: absolute;
		top: 30upx;
		left: 24upx;
		right: 500upx;
		bottom: 22upx;
	}
	.huohang{
		width: 450upx;
		height: 50upx;
		position: absolute;
		top: 50upx;
		left: 300upx;
		right: 50upx;
		bottom: 134upx;
	}
	.huozxia{
		position: absolute;
        top: 206upx;
		right: 20upx;
		bottom: 36upx;
		left: 602upx;
		width: 128upx;
		height: 34upx;
		color:#ABABAB ;
		font-size: 24upx;
	}
	
	
</style>
